home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / HARDWARE / IICALARM / !iicAlarm / Tools / !AlarmOff / !Run (.txt)
RISC OS BBC BASIC V Source  |  1994-05-03  |  2KB  |  70 lines

  1.  > !Run
  2.  AlarmOff 0.10
  3.  Switch the Alarm-System off.
  4.  buf% 32
  5.  + 2048
  6.  "Error in ";
  7. 8debug% = 
  8.            :
  9.  Informationstexte anzeigen ?
  10. "XOS_ReadVarVal", "AlarmExt$Debug", buf%, -1, 0, 0 
  11.  ,,d%
  12.  d%<>0 
  13.  debug% = 
  14. ?buf% = 0
  15. "XOS_ReadVarVal", "Wimp$State", buf%, 30, 0, 0 
  16.  ,,d%
  17. $buf%,8)="commands" 
  18.  debug% = 
  19.  1. Reset all the AlarmMode variables.
  20. *Unset AlarmMode
  21.  *Unset AlarmExt$Dir
  22. *UnSet Alias$Bye
  23.  *UnSet Alias$AlarmOff
  24.  *UnSet Alias$AlarmOn
  25.  *UnSet Alias$AlarmQuit
  26.  *UnSet Alias$AlarmShut
  27.  2. Switch off the Alarm-System
  28. SwitchToAlarm
  29.  debug% 
  30. "Alarm is now off."
  31. "N;-------------------------------------------------------------------------
  32. #<; (1) Wir schalten die Uhr auf Alarm-Modus und damit den
  33. $G;     default- (reset-) maessigen Sekundentakt am Alarmausgang aus.
  34. %D;  Das Alarmsystem ist damit zwar "an" aber dennoch deaktiviert.
  35. &N;-------------------------------------------------------------------------
  36. SwitchToAlarm
  37. ) a%  = 
  38. peek(0) 
  39.  (255-1-2-4)
  40. a% += 4
  41. poke(8,0)     :
  42.  Alarm-Register : alles "aus"
  43. poke(0,a%)    :
  44.  Status-Register: Alarm-System "an"
  45.  Alarm nun aktiv, Bit 0 = 0 --> Alarm = 0
  46. 0N;-------------------------------------------------------------------------
  47. 18; Speichern eines Bytes an einer beliebigen Adresse.
  48. 2N;-------------------------------------------------------------------------
  49. poke(address%, value%)
  50.  blk%, clkadr%
  51.  blk% 2
  52. clkadr% = %10100000
  53. ?blk% = address%
  54. ?(blk%+1) = value%
  55.  "IIC_Control", clkadr%, blk%, 2
  56. <N;-------------------------------------------------------------------------
  57. =G; Lesen eines Bytes von einer beliebigen Adresse. Kann auch benutzt
  58. >'; werden, um die Adresse zu setzen.
  59. ?N;-------------------------------------------------------------------------
  60. peek(address%)
  61.  blk%, clkadr%
  62.  blk% 2
  63. clkadr% = %10100000
  64. ?blk% = address%
  65.  "IIC_Control", clkadr%  , blk%, 1  :
  66.  write address
  67.  "IIC_Control", clkadr%+1, blk%, 1  :
  68.  read value
  69. = ?blk%
  70.